#include <iostream>

using namespace std;
struct m{
    int r;
    int i;
    bool attacked;
    bool died;
};
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int n;
    cin>>n;
    m r[n]={};
    for(int i=0;i<n;i++){
            cin>>r[i].r;
            r[i].i=i;
            r[i].attacked=0;
            r[i].died=0;
    }
    m R[n]={};
    m maxm;
    maxm.r=0;
    for(int j=0;j<n;j++){
        for(int i=0;i<n;i++){
            if(r[i].r>maxm.r){
                maxm=r[i];
            }
        }
        r[maxm.i].r=0;
        R[j]=maxm;
        maxm.r=0;
    }
    for(int i=0;i<n;i++){
        if(!R[i].died and !R[i].attacked){
            R[i].attacked=1;
            for(int j=1;i+j<=n;j++){
                if(!R[i+j].died and R[i+j].r<=R[i].r){
                    R[i+j].died=1;
                    //cout<<R[i].i+1<<"attack"<<R[i+j].i+1<<endl;
                    break;
                }
            }
        }
    }
    int c=n;
    /*for(int i=0;i<n;i++){
        cout<<R[i].r<<" ";
    }
    cout<<endl;
    for(int i=0;i<n;i++){
        cout<<R[i].i<<" ";
    }
    cout<<endl;
    for(int i=0;i<n;i++){
        cout<<R[i].attacked<<" ";
    }
    cout<<endl;*/
    for(int i=0;i<n;i++){
       c-=R[i].died;
    }
    cout<<c;
    return 0;
}
